import jsonschema

json_data = {
    "success": False,
    "code": 10000,
    "message": "xxx登录成功",
    "data": {
        "name": "lily",
        "age": 20
    }
}

schema = {
    "type": "object",
    "properties": {
        "success": {"type": "boolean"},
        "code": {"type": "integer"},
        "message": {"pattern": ".*?登录成功$"},
        "data": {"type": "object",
                 "properties":
                     {
                         "name": {"const": "lily"},
                         "age": {"const": 20}
                     }, "required": ["name", "age"]
                 }
    },
    "required": ["success", "code", "message", "data"]
}
jsonschema.validate(json_data, schema)
# for i in range(1,10):
#     for j in range(1,i+1):
#         print("🦖",end='')
#     print()